package com.xgxd.commons.exceptions;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

/**
 * 贷前管理异常信息
 *
 * @author YanLee
 * com.xgxd.commons.exceptions
 * @date 2017/9/30
 */

public class ExceptionMessage {

    public static HashMap<String, String> exceptionMessage = new HashMap<>();

    static {

//        exceptionMessage.put("1", "贷款相应银行卡号不能为空");
        exceptionMessage.put("4101", "查询失败，该还款信息不存在");
        exceptionMessage.put("4102", "修改失败，借款信息不存在");

        exceptionMessage.put("4201", "新增催收失败，贷款信息有误");
        exceptionMessage.put("4202", "新增催收失败，该笔贷款已还款");

        // 租房信息管理
        exceptionMessage.put("4301","租房ID不能为空");
        exceptionMessage.put("4302","租房信息为空");
        exceptionMessage.put("4303","图片数量不允许超过8张");
        exceptionMessage.put("4304","该房已被租，请选择其他房间");

        exceptionMessage.put("9001", "请求参数不能为空");
        exceptionMessage.put("9002", "网络异常");
        exceptionMessage.put("9003", "请求方法不存在");
        exceptionMessage.put("9004", "请求参数有误");


    }

    public static void main(String a[]) {
        Iterator<Map.Entry<String, String>> it = exceptionMessage.entrySet().iterator();
        while (it.hasNext()) {
            Map.Entry<String, String> entry = it.next();
            System.out.println("| " + entry.getKey() + "| " + entry.getValue() + " |");
        }

    }

}
